/**
 * Copyright (c) 2016 coderyuan.com. All Rights Reserved.
 *
 * EShop
 *
 * ErrorsResult.java created on 下午3:00
 *
 * @author yuanguozheng
 * @version 1.0.0
 * @since 16/3/1
 */
package com.coderyuan.web.api.kit.common;

import com.coderyuan.web.api.kit.models.ApiResultModel;

/**
 * 错误结果
 *
 * @author yuanguozheng
 */
public interface ErrorsResult {

    /**
     * -1xx 请求错误
     */
    ApiResultModel PARAM_ERROR = ResultBuilder.getError(-101, "参数错误");

    ApiResultModel SIGN_ERROR = ResultBuilder.getError(-102, "签名错误");

    /**
     * -2xx 逻辑错误
     */
    ApiResultModel LOGIN_FAILED = ResultBuilder.getError(-201, "用户名或密码错误");

    ApiResultModel USER_NOT_EXISTED = ResultBuilder.getError(-202, "用户不存在");

    ApiResultModel USER_NOT_ACTIVE = ResultBuilder.getError(-203, "用户未激活");

    ApiResultModel NOT_LOGIN = ResultBuilder.getError(-204, "用户未登录");

    ApiResultModel USER_EXISTED = ResultBuilder.getError(-205, "用户已存在");

    ApiResultModel ACCOUNT_ILLEGAL = ResultBuilder.getError(-206, "用户名不合法");

    /**
     * -5xx 数据库\服务器错误
     */
    ApiResultModel DB_ERROR = ResultBuilder.getError(-501, "数据库错误");

    /**
     * -9 未知错误
     */
    ApiResultModel UNKNOWN_ERROR = ResultBuilder.getError(-9, "未知错误");
}
